# for module compiling
import os
Import('RTT_ROOT')
Import('rtconfig')
from building import *

cwd = GetCurrentDir()
evm_dir = cwd + '/../../../../'
LIBPATH = [evm_dir +'/lib/arm/cortex-a9'] 
src = Split('''
''')

if rtconfig.CROSS_TOOL == 'gcc':
    LIBS = ['ecma', 'ejs']  
    CPPPATH = [evm_dir + '/include']
    CCFLAGS =   ' -DEVM_LANG_ENABLE_REPL' +\
                ' -DCONFIG_EVM_MODULE_BUFFER' +\
                ' -DCONFIG_EVM_MODULE_ASSERT' +\
                ' -DCONFIG_EVM_MODULE_NET' +\
                ' -DCONFIG_EVM_MODULE_UART' +\
                ' -DCONFIG_EVM_MODULE_GPIO' +\
                ' -DCONFIG_EVM_MODULE_NET' +\
                ' -DCONFIG_EVM_MODULE_FS'         

group = DefineGroup('EVM', src, depend = [''], LIBS = LIBS, CCFLAGS = CCFLAGS, CPPPATH = CPPPATH, LIBPATH=LIBPATH)

Return('group')
